package com.gitee.cirnochat.chat.filter;

import com.gitee.cirnochat.chat.model.vo.req.ChatMessageSendRequest;
import com.gitee.cirnochat.chat.service.stragegy.ChatMessageSendContext;
import com.gitee.cirnochat.websocket.service.manager.SessionManager;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.security.Principal;

/**
 * 发送消息过滤器
 * 用于处理发送消息前的逻辑
 * @author FlanChan
 * @since 2025/6/28 14:26
 */
@Component
@Order(2)
@RequiredArgsConstructor
@Slf4j
public class SendMessageFilter extends AbstractMessageFilter{

    private final ChatMessageSendContext chatMessageSendContext;
    private final SessionManager sessionManager;

    @Override
    public void doFilter(Object message, Principal principal) {
        if (message instanceof ChatMessageSendRequest sendRequest) {

        }
        super.doFilter(message,principal);
    }
}
